package jtk.project4.fleet.field;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TextField;

public class DriverLicenseInformationField extends GroupControl{
	private TextField numberField;
	private TextField notesField;
	private TextField classField;
	private TextField stateField;
	
	public DriverLicenseInformationField(String bindID){
		setTitle("header.DriverLicense");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields(){
		numberField = new TextField ("number", 20);
		//numberField.setRequired(true);
		
		notesField = new TextField ("notes", 20);
		//notesField.setRequired(true);
		
		classField = new TextField ("class", 20);
		//classField.setRequired(true);
		
		stateField = new TextField ("state", 20);
		//stateField.setRequired(true);
	}
	
	private void createLayout() {
		setLayout(new FormLayout())
		.addLabel("label.unit").addField(numberField)
		.addLabel("label.year").addField(notesField)
		.addRow()
		.addLabel("label.make").addField(classField)
		.addRow()
		.addLabel("label.Model").addField(stateField);
	}
	
}
